/*
 Navicat Premium Data Transfer

 Source Server         : 本地 MySQL
 Source Server Type    : MySQL
 Source Server Version : 80300 (8.3.0)
 Source Host           : localhost:3306
 Source Schema         : cat-collage-backend

 Target Server Type    : MySQL
 Target Server Version : 80300 (8.3.0)
 File Encoding         : 65001

 Date: 23/01/2024 11:58:37
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for cat_hobbies
-- ----------------------------
DROP TABLE IF EXISTS `cat_hobbies`;
CREATE TABLE `cat_hobbies` (
  `id` varchar(255) NOT NULL COMMENT '唯一主键',
  `cat_id` varchar(255) NOT NULL COMMENT '小猫Id',
  `hobby` varchar(255) NOT NULL COMMENT '爱好',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of cat_hobbies
-- ----------------------------
BEGIN;
INSERT INTO `cat_hobbies` (`id`, `cat_id`, `hobby`) VALUES ('1', '1', '1');
COMMIT;

-- ----------------------------
-- Table structure for cat_images
-- ----------------------------
DROP TABLE IF EXISTS `cat_images`;
CREATE TABLE `cat_images` (
  `id` varchar(255) NOT NULL COMMENT '唯一主键',
  `cat_id` varchar(255) NOT NULL COMMENT '小猫Id',
  `url` varchar(255) NOT NULL COMMENT '图片url',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of cat_images
-- ----------------------------
BEGIN;
INSERT INTO `cat_images` (`id`, `cat_id`, `url`) VALUES ('1', '1', '1');
COMMIT;

-- ----------------------------
-- Table structure for cat_positions
-- ----------------------------
DROP TABLE IF EXISTS `cat_positions`;
CREATE TABLE `cat_positions` (
  `id` varchar(255) NOT NULL COMMENT '唯一主键',
  `cat_id` varchar(255) NOT NULL COMMENT '小猫id',
  `lat` double DEFAULT NULL COMMENT '纬度',
  `lng` double DEFAULT NULL COMMENT '经度',
  `position_description` varchar(255) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of cat_positions
-- ----------------------------
BEGIN;
INSERT INTO `cat_positions` (`id`, `cat_id`, `lat`, `lng`, `position_description`) VALUES ('1', '1', 1, 1, '1');
COMMIT;

-- ----------------------------
-- Table structure for cats
-- ----------------------------
DROP TABLE IF EXISTS `cats`;
CREATE TABLE `cats` (
  `id` varchar(255) NOT NULL COMMENT '唯一主键',
  `name` varchar(255) NOT NULL COMMENT '小猫姓名',
  `age` int DEFAULT NULL COMMENT '年龄',
  `weight` double DEFAULT NULL COMMENT '体重',
  `owner_id` varchar(255) NOT NULL COMMENT 'userId',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of cats
-- ----------------------------
BEGIN;
INSERT INTO `cats` (`id`, `name`, `age`, `weight`, `owner_id`) VALUES ('1', '小白猫', 10, 12.5, '1');
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` varchar(255) NOT NULL COMMENT '用户Id',
  `username` varchar(255) NOT NULL COMMENT '用户名',
  `password` varchar(255) NOT NULL COMMENT '密码',
  `token` varchar(255) DEFAULT NULL COMMENT 'token',
  PRIMARY KEY (`id`),
  UNIQUE KEY `唯一` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` (`id`, `username`, `password`, `token`) VALUES ('1', '111111', '111111', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyYW5kIjoiMGU2ZDhhNjZlMDc4OTIyMjAyYWU0YjNiMjQ5NzMwY2QiLCJ0aW1lIjoxNzA1OTc5OTA5MTIxNzgyMDAwLCJ1c2VyX2lkIjoiMSJ9.fNNROFN-1FT1B198JTDxG-_HAcTEXAXPE4F1SGCvIog');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
